// Example code that deserializes and serializes the model.
// extern crate serde;
// #[macro_use]
// extern crate serde_derive;
// extern crate serde_json;
//
// use generated_module::[object Object];
//
// fn main() {
//     let json = r#"{"answer": 42}"#;
//     let model: [object Object] = serde_json::from_str(&json).unwrap();
// }

use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize)]
pub struct YouDaoDic {
    pub web_trans: Option<WebTrans>,
    #[serde(rename = "oxfordAdvanceHtml")]
    pub oxford_advance_html: Option<Oxford>,
    pub ee: Option<Ee>,
    pub blng_sents_part: Option<BlngSentsPart>,
    pub individual: Option<Individual>,
    pub collins_primary: Option<CollinsPrimary>,
    pub rel_word: Option<RelWordClass>,
    pub auth_sents_part: Option<AuthSentsPart>,
    pub simple: Option<Simple>,
    pub media_sents_part: Option<MediaSentsPart>,
    pub expand_ec: Option<ExpandEc>,
    pub etym: Option<Etym>,
    pub phrs: Option<Phrs>,
    pub oxford: Option<Oxford>,
    pub special: Option<WelcomeSpecial>,
    pub input: Option<String>,
    pub collins: Option<Collins>,
    pub meta: Option<Meta>,
    pub webster: Option<Oxford>,
    pub le: Option<String>,
    pub lang: Option<String>,
    pub ec: Option<Ec>,
    #[serde(rename = "oxfordAdvance")]
    pub oxford_advance: Option<Oxford>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct AuthSentsPart {
    #[serde(rename = "sentence-count")]
    pub sentence_count: Option<i64>,
    pub more: Option<String>,
    pub sent: Option<Vec<AuthSentsPartSent>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct AuthSentsPartSent {
    pub score: Option<f64>,
    pub speech: Option<String>,
    #[serde(rename = "speech-size")]
    pub speech_size: Option<String>,
    pub source: Option<String>,
    pub url: Option<String>,
    pub foreign: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct BlngSentsPart {
    #[serde(rename = "sentence-count")]
    pub sentence_count: Option<i64>,
    #[serde(rename = "sentence-pair")]
    pub sentence_pair: Option<Vec<SentencePair>>,
    pub more: Option<String>,
    #[serde(rename = "trs-classify")]
    pub trs_classify: Option<Vec<TrsClassify>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct SentencePair {
    pub sentence: Option<String>,
    #[serde(rename = "sentence-eng")]
    pub sentence_eng: Option<String>,
    #[serde(rename = "sentence-translation")]
    pub sentence_translation: Option<String>,
    #[serde(rename = "speech-size")]
    pub speech_size: Option<String>,
    #[serde(rename = "aligned-words")]
    pub aligned_words: Option<AlignedWords>,
    pub source: Option<String>,
    pub url: Option<String>,
    #[serde(rename = "sentence-speech")]
    pub sentence_speech: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct AlignedWords {
    pub src: Option<Src>,
    pub tran: Option<Src>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Src {
    pub chars: Option<Vec<Char>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Char {
    #[serde(rename = "@s")]
    pub s: Option<String>,
    #[serde(rename = "@e")]
    pub e: Option<String>,
    pub aligns: Option<Aligns>,
    #[serde(rename = "@id")]
    pub id: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Aligns {
    pub sc: Option<Vec<Sc>>,
    pub tc: Option<Vec<Sc>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Sc {
    #[serde(rename = "@id")]
    pub id: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct TrsClassify {
    pub proportion: Option<String>,
    pub tr: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Collins {
    pub collins_entries: Option<Vec<CollinsEntry>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct CollinsEntry {
    pub entries: Option<Entries>,
    pub phonetic: Option<String>,
    pub basic_entries: Option<BasicEntries>,
    pub headword: Option<String>,
    pub star: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct BasicEntries {
    pub basic_entry: Option<Vec<BasicEntry>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct BasicEntry {
    pub cet: Option<String>,
    pub headword: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Entries {
    pub entry: Option<Vec<EntriesEntry>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct EntriesEntry {
    pub tran_entry: Option<Vec<TranEntry>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct TranEntry {
    pub pos_entry: Option<PosEntry>,
    pub exam_sents: Option<ExamSents>,
    pub tran: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct ExamSents {
    pub sent: Option<Vec<ExamSentsSent>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct ExamSentsSent {
    pub chn_sent: Option<String>,
    pub eng_sent: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct PosEntry {
    pub pos: Option<String>,
    pub pos_tips: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct CollinsPrimary {
    pub words: Option<Words>,
    pub gramcat: Option<Vec<Gramcat>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Gramcat {
    pub audiourl: Option<String>,
    pub pronunciation: Option<String>,
    pub senses: Option<Vec<SenseElement>>,
    pub partofspeech: Option<String>,
    pub audio: Option<String>,
    pub forms: Option<Vec<Option<serde_json::Value>>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct SenseElement {
    pub examples: Option<Vec<Example>>,
    pub definition: Option<String>,
    pub lang: Option<String>,
    pub word: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Example {
    pub sense: Option<ExampleSense>,
    pub example: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct ExampleSense {
    pub lang: Option<String>,
    pub word: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Words {
    pub indexforms: Option<Vec<String>>,
    pub word: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Ec {
    pub web_trans: Option<Vec<String>>,
    pub special: Option<Vec<SpecialElement>>,
    pub exam_type: Option<Vec<String>>,
    pub source: Option<EcSource>,
    pub word: Option<EcWord>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct EcSource {
    pub name: Option<String>,
    pub url: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct SpecialElement {
    pub nat: Option<String>,
    pub major: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct EcWord {
    pub usphone: Option<String>,
    pub ukphone: Option<String>,
    pub ukspeech: Option<String>,
    pub trs: Option<Vec<IndividualTr>>,
    pub wfs: Option<Vec<PurpleWf>>,
    #[serde(rename = "return-phrase")]
    pub return_phrase: Option<String>,
    pub usspeech: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct IndividualTr {
    pub pos: Option<String>,
    pub tran: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct PurpleWf {
    pub wf: Option<WfWf>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct WfWf {
    pub name: Option<String>,
    pub value: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Ee {
    pub source: Option<EcSource>,
    pub word: Option<EeWord>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct EeWord {
    pub trs: Option<Vec<PurpleTr>>,
    pub phone: Option<String>,
    pub speech: Option<String>,
    #[serde(rename = "return-phrase")]
    pub return_phrase: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct PurpleTr {
    pub pos: Option<String>,
    pub tr: Option<Vec<FluffyTr>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct FluffyTr {
    pub tran: Option<String>,
    #[serde(rename = "similar-words")]
    pub similar_words: Option<Vec<String>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Etym {
    pub etyms: Option<Etyms>,
    pub word: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Etyms {
    pub en: Option<Vec<En>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct En {
    pub source: Option<String>,
    pub word: Option<String>,
    pub value: Option<String>,
    pub url: Option<String>,
    pub desc: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct ExpandEc {
    #[serde(rename = "return-phrase")]
    pub return_phrase: Option<String>,
    pub source: Option<EcSource>,
    pub word: Option<Vec<ExpandEcWord>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct ExpandEcWord {
    #[serde(rename = "transList")]
    pub trans_list: Option<Vec<TransList>>,
    pub pos: Option<String>,
    pub wfs: Option<Vec<WfWf>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct TransList {
    pub content: Option<Content>,
    pub trans: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Content {
    #[serde(rename = "detailPos")]
    pub detail_pos: Option<String>,
    #[serde(rename = "examType")]
    pub exam_type: Option<Vec<ExamType>>,
    pub sents: Option<Vec<ContentSent>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct ExamType {
    pub en: Option<String>,
    pub zh: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct ContentSent {
    #[serde(rename = "sentOrig")]
    pub sent_orig: Option<String>,
    #[serde(rename = "sourceType")]
    pub source_type: Option<String>,
    #[serde(rename = "sentSpeech")]
    pub sent_speech: Option<String>,
    #[serde(rename = "sentTrans")]
    pub sent_trans: Option<String>,
    pub source: Option<String>,
    #[serde(rename = "type")]
    pub sent_type: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Individual {
    pub trs: Option<Vec<IndividualTr>>,
    pub level: Option<String>,
    #[serde(rename = "examInfo")]
    pub exam_info: Option<ExamInfo>,
    #[serde(rename = "return-phrase")]
    pub return_phrase: Option<String>,
    #[serde(rename = "pastExamSents")]
    pub past_exam_sents: Option<Vec<PastExamSent>>,
    pub mnemonic: Option<Mnemonic>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct ExamInfo {
    pub year: Option<i64>,
    #[serde(rename = "questionTypeInfo")]
    pub question_type_info: Option<Vec<QuestionTypeInfo>>,
    #[serde(rename = "recommendationRate")]
    pub recommendation_rate: Option<i64>,
    pub frequency: Option<i64>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct QuestionTypeInfo {
    pub time: Option<i64>,
    #[serde(rename = "type")]
    pub question_type_info_type: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Mnemonic {
    pub method: Option<String>,
    pub word: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct PastExamSent {
    pub en: Option<String>,
    pub source: Option<String>,
    pub zh: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct MediaSentsPart {
    #[serde(rename = "sentence-count")]
    pub sentence_count: Option<i64>,
    pub more: Option<String>,
    pub query: Option<String>,
    pub sent: Option<Vec<MediaSentsPartSent>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct MediaSentsPartSent {
    #[serde(rename = "@mediatype")]
    pub mediatype: Option<String>,
    pub snippets: Option<Snippets>,
    #[serde(rename = "speech-size")]
    pub speech_size: Option<String>,
    pub eng: Option<String>,
    pub chn: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Snippets {
    pub snippet: Option<Vec<Snippet>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Snippet {
    #[serde(rename = "streamUrl")]
    pub stream_url: Option<String>,
    pub duration: Option<String>,
    pub swf: Option<String>,
    pub name: Option<String>,
    pub source: Option<String>,
    pub win8: Option<String>,
    #[serde(rename = "sourceUrl")]
    pub source_url: Option<String>,
    #[serde(rename = "imageUrl")]
    pub image_url: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Meta {
    pub input: Option<String>,
    #[serde(rename = "guessLanguage")]
    pub guess_language: Option<String>,
    #[serde(rename = "isHasSimpleDict")]
    pub is_has_simple_dict: Option<String>,
    pub le: Option<String>,
    pub lang: Option<String>,
    pub dicts: Option<Vec<String>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Oxford {
    #[serde(rename = "encryptedData")]
    pub encrypted_data: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Phrs {
    pub word: Option<String>,
    pub phrs: Option<Vec<Phr>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Phr {
    pub headword: Option<String>,
    pub translation: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct RelWordClass {
    pub word: Option<String>,
    pub stem: Option<String>,
    pub rels: Option<Vec<RelElement>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct RelElement {
    pub rel: Option<RelRel>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct RelRel {
    pub pos: Option<String>,
    pub words: Option<Vec<RelWord>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct RelWord {
    pub word: Option<String>,
    pub tran: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Simple {
    pub query: Option<String>,
    pub word: Option<Vec<SimpleWord>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct SimpleWord {
    pub usphone: Option<String>,
    pub ukphone: Option<String>,
    pub ukspeech: Option<String>,
    #[serde(rename = "return-phrase")]
    pub return_phrase: Option<String>,
    #[serde(rename = "multiPhone")]
    pub multi_phone: Option<MultiPhone>,
    pub usspeech: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct MultiPhone {
    pub uk: Option<Vec<Uk>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Uk {
    pub phone: Option<String>,
    pub pos: Option<Vec<String>>,
    pub speech: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct WelcomeSpecial {
    pub summary: Option<Summary>,
    #[serde(rename = "co-add")]
    pub co_add: Option<String>,
    pub total: Option<String>,
    pub entries: Option<Vec<SpecialEntry>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct SpecialEntry {
    pub entry: Option<EntryEntry>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct EntryEntry {
    pub major: Option<String>,
    pub trs: Option<Vec<EntryTr>>,
    pub num: Option<i64>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct EntryTr {
    pub tr: Option<TentacledTr>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct TentacledTr {
    pub nat: Option<String>,
    #[serde(rename = "chnSent")]
    pub chn_sent: Option<String>,
    pub cite: Option<String>,
    #[serde(rename = "docTitle")]
    pub doc_title: Option<String>,
    #[serde(rename = "engSent")]
    pub eng_sent: Option<String>,
    pub url: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Summary {
    pub sources: Option<Sources>,
    pub text: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Sources {
    pub source: Option<SourcesSource>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct SourcesSource {
    pub site: Option<String>,
    pub url: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct WebTrans {
    #[serde(rename = "web-translation")]
    pub web_translation: Option<Vec<WebTranslation>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct WebTranslation {
    pub key: Option<String>,
    #[serde(rename = "key-speech")]
    pub key_speech: Option<String>,
    pub trans: Option<Vec<Tran>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Tran {
    pub value: Option<String>,
}
